package com.wdhcr.repository;


import com.wdhcr.entity.Photo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface PhotoRepository extends JpaRepository<Photo,Long> {

    @Query("select p from Photo p where p.published = true ")
    Page<Photo> findPhoto(Pageable pageable);

}
